<template>
  <div>
    <Header/>
      <router-view></router-view>
    <Footer v-show="isHidden"/>
  </div>
</template>

<script>

import Footer from "@comp/Footer";
import Header from "@comp/Header";

export default {
  name: 'App',
  components:{Footer,Header},
  computed:{
    isHidden(){
      // 第一种方式：通过路由组件名称判断
      // return this.$route.name!=='Login' && this.$route.name!=='Register'

      // 第二种方式：通过路由设置自带的元信息进行判断
      return !this.$route.meta.isHidden
    }
  },
}
</script>

<style scoped lang="less">

</style>